<form id="pagerForm" method="post" action="${ctx!}/admin/dictionary/list"></form>

<div class="pageContent" style="padding: 0px">
	<div class="panelBar" style="margin-top: -1px;">
		<ul class="toolBar">
			<li><a class="add" href="${ctx!}/admin/dictionary/toModifyPage" target="dialog" rel="modifyDictionaryDialogs" title="新增字典数据" mask=true width="520" height="255"><span>添加</span></a></li>
			<li class="line">line</li>
			<li><a class="edit" href="${ctx!}/admin/dictionary/enableOrdisable" target="selectedTodo" rel="ids" title="确认启用 或 停用？"><span>启用-停用</span></a></li>
		</ul>
	</div>
	<div layoutH="0" style="float:left; display:block; overflow:auto; width:600px; border-right:solid 1px #CCC; line-height:21px; background:#fff">
		<table class="table" width="100%" layoutH="50">
			<thead>
				<tr>
					<th width="40" align="center"><input type="checkbox" class="checkboxCtrl" group="ids" /></th>
					<th width="50" align="left">序号</th>
					<th width="100" align="left">代码</th>
					<th width="100" align="left">名称</th>
					<th width="150" align="center">创建时间</th>
					<th width="40" align="center">排序</th>
					<th width="40" align="center">状态</th>
					<th width="100" align="center">操作</th>
				</tr>
			</thead>
			<tbody>
				<#list parent as p>
				<tr>
					<td><input type="checkbox" name="ids" value="${p.id}" /></td>
					<td>${p_index+1}</td>
					<td>${p.code!}</td>
					<td>${p.name!}</td>
					<td>${p.create_time!}</td>
					<td>${p.sort!}</td>
					<td><#if p.enable == '0'> <div>启用</div> <#else> <div style="color:red">停用</div> </#if></td>
					<td>
						<a href="${ctx!}/admin/dictionary/toModifyPage/${p.id!}" target="dialog" title="编辑字典数据" rel="modifyDictionaryDialogs" mask=true width="520" height="255" style="color:#3C7FB1">编辑</a>
					</td>
				</tr>
					<#assign i = 0/>
					<#list children as c>
						<#-- 在父字典数据下的打印子字典数据 -->
						<#if c.pid == p.id>
						<#assign i = i + 1/>
						<tr>
							<td><input type="checkbox" name="ids" value="${c.id}" /></td>
							<td>${p_index+1} - ${i}</td>
							<td>${c.code!}</td>
							<td>${c.name!}</td>
							<td>${c.create_time!}</td>
							<td>${c.sort!}</td>
							<td><#if c.enable == '0'> <div>启用</div> <#else> <div style="color:red">停用</div> </#if></td>
							<td>
								<a href="${ctx!}/admin/dictionary/toModifyPage/${c.id!}" target="dialog" title="编辑字典数据" rel="modifyDictionaryDialogs" mask=true width="520" height="255" style="color:#3C7FB1">编辑</a>
							</td>
						</tr>
						</#if>
					</#list>
				</#list>
			</tbody>
		</table>
	</div>
	<div id="jbsxBox" class="unitBox" style="margin-left:601px;">
		<input type="hidden" id="ctx" value="${ctx!}"/>
		<p id="loading">正在加载...</p>
		<ul id="dictionaryTree" class="ztree" layoutH="62"></ul>
		<div class="panelBar">
			<div class="panelBar" style="margin-top: -1px;">
				<ul class="toolBar">
					<li><a class="edit" id="delBut"><span>启用(停用)</span></a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
<script src="${ctx!}/html/js/admin/dictionaryTree.js" type="text/javascript"></script>
